/*
package com.its.controller;

import com.its.domain.BaseResult;
import com.its.manager.pojo.Permission;
import com.its.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/permission")
public class PermissionController {
    //注入业务层属性
    @Autowired
    private PermissionService permissionService;

    //声明单元方法：新增权限
    @PostMapping("/add")
    public BaseResult addPermission(@RequestBody Permission permission){
        return BaseResult.ok(permissionService.addPermissionService(permission));
    }

    //声明单元方法：修改权限
    @PutMapping("/update")
    public BaseResult updatePermission(@RequestBody Permission permission){
        return BaseResult.ok(permissionService.updatePermissionService(permission));
    }

    //声明单元方法：删除权限
    @DeleteMapping("/delete")
    public BaseResult deletePermission(Long pid){
        return BaseResult.ok(permissionService.deletePermissionService(pid));
    }

    //声明单元方法：根据Id查询权限
    @GetMapping("/findById")
    public BaseResult selectPermissionById(Long pid){
        return BaseResult.ok(permissionService.selectPermissionByIdService(pid));
    }

    //声明单元方法：分页查询权限
    @GetMapping("/search")
    public BaseResult selectPermissionByPage(Integer page,Integer size){
        return BaseResult.ok(permissionService.selectPermissionByPageService(page, size));
    }

    //声明单元方法：查询所有权限
    @GetMapping("/findAll")
    public BaseResult getAllPermission(){
        return BaseResult.ok(permissionService.getAllPermissionService());
    }
}

*/
